import React from "react";
import CardInfo from "./page/CardInfo";
import QRCodeGenerator from "./page/QRCodeGenerator";
import { generateVCard } from "./page/utils/vcard";

const App = () => {
  const userData = {
    name: "张三",
    title: "高级前端工程师",
    company: "某某科技有限公司",
    phone: "+86 138-1234-5678",
    email: "zhangsan@example.com",
    linkedin: "https://linkedin.com/in/zhangsan",
    github: "https://github.com/zhangsan",
    avatar:
      "http://img.wxcha.com/m00/f0/f5/5e3999ad5a8d62188ac5ba8ca32e058f.jpg",
  };

  return (
    <div className="App">
      <CardInfo user={userData} />
      <QRCodeGenerator vCardData={generateVCard(userData)} />
    </div>
  );
};

export default App;
